package com.sproutedu.xxtbkt_tm.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.sprout.sp_hxs.bean.CollectionChapterDean;
import com.sprout.sp_hxs.bean.RecordChapterDean;

import com.sproutedu.xxtbkt_tm.greendao.gen.CollectionChapterDeanDao;
import com.sproutedu.xxtbkt_tm.greendao.gen.RecordChapterDeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig collectionChapterDeanDaoConfig;
    private final DaoConfig recordChapterDeanDaoConfig;

    private final CollectionChapterDeanDao collectionChapterDeanDao;
    private final RecordChapterDeanDao recordChapterDeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        collectionChapterDeanDaoConfig = daoConfigMap.get(CollectionChapterDeanDao.class).clone();
        collectionChapterDeanDaoConfig.initIdentityScope(type);

        recordChapterDeanDaoConfig = daoConfigMap.get(RecordChapterDeanDao.class).clone();
        recordChapterDeanDaoConfig.initIdentityScope(type);

        collectionChapterDeanDao = new CollectionChapterDeanDao(collectionChapterDeanDaoConfig, this);
        recordChapterDeanDao = new RecordChapterDeanDao(recordChapterDeanDaoConfig, this);

        registerDao(CollectionChapterDean.class, collectionChapterDeanDao);
        registerDao(RecordChapterDean.class, recordChapterDeanDao);
    }
    
    public void clear() {
        collectionChapterDeanDaoConfig.clearIdentityScope();
        recordChapterDeanDaoConfig.clearIdentityScope();
    }

    public CollectionChapterDeanDao getCollectionChapterDeanDao() {
        return collectionChapterDeanDao;
    }

    public RecordChapterDeanDao getRecordChapterDeanDao() {
        return recordChapterDeanDao;
    }

}
